-
Notifications
You must be signed in to change notification settings - Fork 10
[Kotlin Sync] Add additional SearchOperator helper methods for the rest of the Atlas Search operators #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for docs-kotlin-sync ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
source/whats-new.txt
Outdated
@@ -42,6 +42,10 @@ and features: | |||
the :ref:`MONGODB-OIDC: Kubernetes <kotlin-sync-auth-kubernetes>` | |||
section of the Enterprise Authentication Mechanisms guide | |||
|
|||
.. replacement:: atlas-query-operators | |||
|
|||
the `SearchOperator Interface API documentation <{+api+}/com/mongodb/client/model/search/SearchOperator.html>`__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: there's no search page but there is a section on the Aggregation page. Consider adding a note there?
5ae6fc7
to
0ea55ce
Compare
source/aggregation.txt
Outdated
.. _kotlin-sync-atlas-search-stage: | ||
|
||
Pipelines Stages for Atlas Search | ||
--------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: Consider moving this section after the main aggregation examples on this page. Also consider renaming this section to just Atlas Search
and then creating a subsection after the paragraph called Create a Search Query
or something like that?
source/aggregation.txt
Outdated
:atlas:`Atlas Search </atlas-search>` queries take the form of an aggregation pipeline stage. Atlas | ||
Search provides ``$search`` and ``$searchMeta`` stages, both of which must be the first | ||
stage in any query pipeline. For more information about Atlas pipeline stages, | ||
see the :atlas:`Choose the Aggregation Pipeline Stage | ||
</atlas-search/query-syntax/>` page in the Atlas | ||
manual. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: simplify/combine sentences
:atlas:`Atlas Search </atlas-search>` queries take the form of an aggregation pipeline stage. Atlas | |
Search provides ``$search`` and ``$searchMeta`` stages, both of which must be the first | |
stage in any query pipeline. For more information about Atlas pipeline stages, | |
see the :atlas:`Choose the Aggregation Pipeline Stage | |
</atlas-search/query-syntax/>` page in the Atlas | |
manual. | |
You can perform an :atlas:`Atlas Search </atlas-search>` query by creating an aggregation pipeline | |
that contains one of the following pipeline stages: | |
- ``$search`` | |
- ``$searchMeta`` | |
For more information about Atlas pipeline stages, see the :atlas:`Choose the Aggregation Pipeline Stage | |
</atlas-search/query-syntax/>` page in the Atlas documentation. |
source/aggregation.txt
Outdated
</atlas-search/query-syntax/>` page in the Atlas | ||
manual. | ||
|
||
.. sharedinclude:: dbx/jvm/atlas-search-operator-helpers.rst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: consider revising the language in the table in this shared include to have the first column header be Operator
instead of operation (as this is what they are referred to in the linked atlas docs`
source/aggregation.txt
Outdated
.. code-block:: kotlin | ||
|
||
val searchStage: Bson = Aggregates.search( | ||
SearchOperator.compound() | ||
.filter( | ||
listOf( | ||
SearchOperator.text(fieldPath("genres"), "Drama"), | ||
SearchOperator.phrase(fieldPath("cast"), "sylvester stallone"), | ||
SearchOperator.numberRange(fieldPath("year")).gtLt(1980, 1989), | ||
SearchOperator.wildcard(fieldPath("title"), "Rocky *") | ||
) | ||
) | ||
) | ||
|
||
.. replacement:: searchoperator-interface-api-docs | ||
|
||
the `SearchOperator Interface API documentation <{+core-api+}/client/model/search/SearchOperator.html>`__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: correct the indentation of the replacement content
source/aggregation.txt
Outdated
|
||
.. sharedinclude:: dbx/jvm/atlas-search-operator-helpers.rst | ||
|
||
.. replacement:: atlas-query-operators-example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: in the docs-shared file - change the code description to actually reference the strings as they appear in the text. This is helpful for making sure users see the 1:1 mapping of the description to the code example
i.e
The following code creates a search stage for a pipeline with the following filters:
genres
array field includes"drama"
etc
source/aggregation.txt
Outdated
.. code-block:: kotlin | ||
|
||
val searchStage: Bson = Aggregates.search( | ||
SearchOperator.compound() | ||
.filter( | ||
listOf( | ||
SearchOperator.text(fieldPath("genres"), "Drama"), | ||
SearchOperator.phrase(fieldPath("cast"), "sylvester stallone"), | ||
SearchOperator.numberRange(fieldPath("year")).gtLt(1980, 1989), | ||
SearchOperator.wildcard(fieldPath("title"), "Rocky *") | ||
) | ||
) | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: use a literalinclude and include output
source/whats-new.txt
Outdated
the :ref:`Pipelines Stages for Atlas Search | ||
<kotlin-sync-atlas-search-stage>` section |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the :ref:`Pipelines Stages for Atlas Search | |
<kotlin-sync-atlas-search-stage>` section | |
the :ref:`kotlin-sync-atlas-search-stage` section of the Aggregation guide |
…st of the Atlas Search operators (#87) * atlas search page * aggregation section * link * fix link * eg search stage * fix core-api usage * RR review * add projection * format * eg * wip * wip * wip * WIP * Update whats-new.txt --------- Co-authored-by: Rea Rustagi <[email protected]> Co-authored-by: rustagir <[email protected]> (cherry picked from commit 80461ae)
…st of the Atlas Search operators (#87) (#91) * atlas search page * aggregation section * link * fix link * eg search stage * fix core-api usage * RR review * add projection * format * eg * wip * wip * wip * WIP * Update whats-new.txt --------- Co-authored-by: Rea Rustagi <[email protected]> Co-authored-by: rustagir <[email protected]> (cherry picked from commit 80461ae) Co-authored-by: Rachel Mackintosh <[email protected]>
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-48104
There is no atlas search page in this docs set.
Staging Links
Self-Review Checklist